<?php
/**
 ***** 扶摇而上、抱守本真 ******
 * @author Dana
 * @Date 2021/6/24
 */


class pig{
    public $name;
    protected $spouse;
    private $password;

    public function __construct($name)
    {
        $this->name = $name;
    }

    /**
     * @return mixed
     */
    public function getName()
    {
        return $this->name;
    }


    protected function setSpouse(Pig $spouse){
        if(!isset($this->spouse)){
            $this->spouse = $spouse;
        }

    }
    private function setPassword($password){
        $this->password = $password;
    }
}

// 快速了解类

$res = Reflection::export(new ReflectionClass('pig'),true);
